{% extends "threadedforum_base.html" %}

{% block content %}
    <h1>{{category_name}}</h1>
    {% if is_privileged %}
        <div>   <a href="{% url tf_category_delete category_slug %}">Delete</a> |
                <a href="{% url tf_category_update category_slug %}">Edit</a> </div>
    {% endif %}
    <ul>
        {% for thread in thread_list %}
            {% if not thread.is_private or user.is_active %}
                {% if not thread.is_hidden or is_privileged %}
                    <li><a href="{% url tf_thread category_slug,thread.id %}">{{ thread.title }}</a>
                        <ul><li>{{ thread.body|truncatewords:20 }}</li></ul>
                    </li>
                {% endif %}
            {% endif %}
        {% endfor %}
    </ul>
    <a href="{% url tf_thread_create category_slug %}">Add a Thread</a>
{% endblock %}